package com.base;

/**
 * 返回状态码枚举类
 */
public enum Status {
    SUCCESS(200, "success"),
    ERROR(500, "error"),
    UNAUTHORIZED(401, "unauthorized"),
    FORBIDDEN(403, "forbidden"),
    NOT_FOUND(404, "not found"),
    METHOD_NOT_ALLOWED(405, "method not allowed"),
    REQUEST_TIMEOUT(408, "request timeout"),
    TOO_MANY_REQUESTS(429, "too many requests"),
    INTERNAL_SERVER_ERROR(500, "internal server error");

    private final int code;
    private final String description;

    Status(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    // 静态常量定义
    public static final int SUCCESS_CODE = 200;
    public static final int ERROR_CODE = 500;
    public static final int UNAUTHORIZED_CODE = 401;
    public static final int FORBIDDEN_CODE = 403;
    public static final int NOT_FOUND_CODE = 404;
    public static final int METHOD_NOT_ALLOWED_CODE = 405;
    public static final int REQUEST_TIMEOUT_CODE = 408;
    public static final int TOO_MANY_REQUESTS_CODE = 429;
    public static final int INTERNAL_SERVER_ERROR_CODE = 500;

    /**文件状态定义
     * 售后订单状态
     * 1.编辑中（自己可以看到）'editing'
     * 2.已确认（同角色可以看到）'confirmed'
     * 3.已发布（流转到下一个部门可以看到）'published'
     * 7.待审核 tobereviewed
     * 4.进行中（处理售后人员以及部门领导和技术部门综合部可以看到）'processing'
     * 5.已完结（销售人员及领导可以看到）'completed'--转入下一个阶段
     * 9.待完结（关键人员及领导可以看到）'tobecompleted'--转入下一个阶段
     * 10.待总结（关键人员及领导可以看到）'tosummarized'--转入下一个阶段
     * 8.完结待审核（关键人员及领导可以看到）'completed_tobereviewed'--转入下一个阶段
     * 6.已归档（关键人员及领导可以看到）'archived'--转入下一个阶段
     */
    //待发布...
    //编辑中
    public static final String SERVICE_ORDER_STATUS_EDITING = "editing";
    //已确认
    public static final String SERVICE_ORDER_STATUS_CONFIRMED = "confirmed";
    //已发布...
    //已发布
    public static final String SERVICE_ORDER_STATUS_PUBLISHED = "published";
    //待审核
    public static final String SERVICE_ORDER_STATUS_TO_BE_REVIEWED = "tobereviewed";
    //进行中...
    //进行中
    public static final String SERVICE_ORDER_STATUS_PROCESSING = "processing";
    //待总结
    public static final String SERVICE_ORDER_STATUS_TO_BE_SUMMARIZED = "tosummarized";
    //待完结
    public static final String SERVICE_ORDER_STATUS_TO_BE_COMPLETED = "tobecompleted";
    //完结待审核
    public static final String SERVICE_ORDER_STATUS_COMPLETED_TO_BE_REVIEWED = "completed_tobereviewed";
    //完结...
    //已完结
    public static final String SERVICE_ORDER_STATUS_COMPLETED = "completed";
    //已归档
    public static final String SERVICE_ORDER_STATUS_ARCHIVED = "archived";



    /**
     * Service（内容）
     */
    //服务通知单
    public static final String SERVICE_ORDER = "service_orders";
    //确认单
    public static final String CONFIRMATION_ORDER = "confirmation_orders";
    //任务单
    public static final String TASK_ORDER = "task_orders";
    //总结单
    public static final String SUMMARY_ORDER = "summary_orders";
    //服务问题
    public static final String SERVICE_PROBLEM = "service_problems";
    //仅通知
    public static final String NOTICE = "notices";

    /**
     * Service（内容中文名）
     */
    public static final String SERVICE_ORDER_CN = "服务通知单";
    public static final String CONFIRMATION_ORDER_CN = "服务确认单";
    public static final String TASK_ORDER_CN = "服务任务单";
    public static final String SUMMARY_ORDER_CN = "服务总结单";
    public static final String SERVICE_PROBLEM_CN = "服务问题";




    /**
     * 用户状态定义
     * 状态为：服务外出中、在岗办公中、公务外出中、休息中、请假中、调休中
     */
    public static final String USER_STATUS_ON_AFTER_SALES_TRIP = "AfterSalesTrip";
    public static final String USER_STATUS_ON_DUTY = "InOffice";
    public static final String USER_STATUS_ON_BUSINESS_TRIP = "OnBusinessTrip";
    public static final String USER_STATUS_RESTING = "Resting";
    public static final String USER_STATUS_ON_LEAVE = "OnLeave";
    public static final String USER_STATUS_COMPENSATORY_LEAVE = "CompensatoryLeave";


    /**
     * 消息状态定义
     * 消息状态: UNTREATED未处理, PROCESSED已处理, AGREE同意, REFUSE拒绝
     */
    //同意
    public static final String MESSAGE_STATUS_AGREE = "AGREE";
    //拒绝
    public static final String MESSAGE_STATUS_REFUSE = "REFUSE";
    //已处理
    public static final String MESSAGE_STATUS_PROCESSED = "PROCESSED";
    //未处理
    public static final String MESSAGE_STATUS_UNTREATED = "UNTREATED";





}
